package com.iris.temp;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @date : 2017年3月30日 下午1:51:08
 * @author : Iris.Xiao
 * @version : 1.0
 * @description : 
*/
public class Test3 {

	List<Map<String,String>> list = new ArrayList<Map<String,String>>();
	public void add(String auditFlag,String openMode,String appShareUrl,String videoShareUrl,String packageName,String masterid ,String appname,String logo){
		Map<String,String> map = new HashMap<String,String>();
		if(appShareUrl==null){
			appShareUrl = "http://www.zillionplayer.com/";
		}
		if(videoShareUrl==null){
			videoShareUrl = "http://player.3dzed.com/player/videoshare/index.jsp";
		}
		map.put("auditFlag", auditFlag);
		map.put("openMode", openMode);
		map.put("appShareUrl", appShareUrl);
		map.put("videoShareUrl", videoShareUrl);
		map.put("packageName", packageName);
		map.put("appname", appname);
		map.put("logo", logo);
		map.put("masterid", masterid);
		list.add(map);
	}
	
	public void print(){
		String sqlInsert="INSERT INTO zed_player_param (param_id, param_type, param_name, param_value, param_dec, country_code, create_time, update_time, create_user, update_user, order_by) ";
		String auditFlag="VALUES(REPLACE(UUID(),'-',''),'cloudConfig','%s','%s','审核开关','%s','2017-03-21 11:46:24','2017-03-21 11:46:24','victor','victor','1');";
		String openMode="VALUES(REPLACE(UUID(),'-',''),'cloudConfig','%s','%s','首页打开模式','%s','2017-03-21 11:46:24','2017-03-21 11:46:24','victor','victor','2');";
		String appShareUrl="VALUES(REPLACE(UUID(),'-',''),'cloudConfig','%s','%s','app分享地址','%s','2017-03-21 11:46:24','2017-03-21 11:46:24','victor','victor','3');";
		String videoShareUrl="VALUES(REPLACE(UUID(),'-',''),'cloudConfig','%s','%s','影片分享地址','%s','2017-03-21 11:46:24','2017-03-21 11:46:24','victor','victor','4');";
		String packageName="VALUES(REPLACE(UUID(),'-',''),'cloudConfig','%s','%s','包名','%s','2017-03-21 11:46:24','2017-03-21 11:46:24','victor','victor','5');";
		String appname="VALUES(REPLACE(UUID(),'-',''),'cloudConfig','%s','%s','应用名字','%s','2017-03-21 11:46:24','2017-03-21 11:46:24','victor','victor','6');";
		String logo="VALUES(REPLACE(UUID(),'-',''),'cloudConfig','%s','%s','logo','%s','2017-03-21 11:46:24','2017-03-21 11:46:24','victor','victor','7');";
		for (Map<String, String> map : list) {
			System.out.println(String.format(sqlInsert+auditFlag, "auditFlag",map.get("auditFlag"),map.get("masterid")));
			System.out.println(String.format(sqlInsert+openMode, "openMode",map.get("openMode") ,map.get("masterid")));
			System.out.println(String.format(sqlInsert+appShareUrl, "appShareUrl",map.get("appShareUrl"),map.get("masterid")));
			System.out.println(String.format(sqlInsert+videoShareUrl, "videoShareUrl",map.get("videoShareUrl"),map.get("masterid")));
			System.out.println(String.format(sqlInsert+packageName, "packageName",map.get("packageName"),map.get("masterid")));
			System.out.println(String.format(sqlInsert+appname, "appname",map.get("appname"),map.get("masterid")));
//			System.out.println(String.format(sqlInsert+logo, "logo",map.get("logo"),map.get("masterid")));
//			System.out.println("UPDATE zed_player_param SET param_type ='"+map.get("appname").replaceAll(" ", "_")+"' WHERE country_code='"+map.get("masterid")+"';");
		}
	}
	public static void main(String[] args) {
		Test3 test= new Test3();
//		test.add("open", "recommend", null, null, "com.zillion.operate", "WEBMASTER_137526","","");
//		test.add("open", "recommend", null, null, "com.zillion.nnhd", "WEBMASTER_451b8686a77a4912b4be89b28669221e","99 HD Player","icon_99hd.png");
//		test.add("open", "recommend", null, null, "com.zillion.vplay", "WEBMASTER_552fd8d6590841f98130f33b63ded7d2","Vplaytv","icon_vplay.png");
//		test.add("open", "recommend", null, null, "com.zillion.nungg", "WEBMASTER_a97f211a08ef4e37a536f2dcaca7e01b","Nungg Movie","icon_nungg.png");
//		test.add("open", "recommend", null, null, "com.zillion.doonung", "WEBMASTER_137840","DooNung Movie","icon_doonung.png");
//		
//		test.add("open", "recommend", null, null, "com.zillion.movibay", "WEBMASTER_87a8365e90fc425287831bacfd15b39b","Movibay","icon_moviba.png");
//		test.add("open", "recommend", null, null, "com.zillion.jomvphd", "WEBMASTER_f2677401a1494f76a0bab7a688cf7582","Movie JoMvpHD","icon_jomvphd.png");
//		test.add("open", "recommend", null, null, "com.zillion.avsee", "WEBMASTER_48351db23e7a4e6daddc1dff3ea550e1","AVsee","icon_avsee.png");
//		test.add("open", "recommend", null, null, "com.zillion.movies", "WEBMASTER_e5fdad422d4e409188f4ab40a58704b1","movies900","icon_movies900.png");
//		test.add("open", "recommend", null, null, "com.zillion.filmkeren", "WEBMASTER_96ad7058d5c5426e9201bbe534904f84","Filmkeren21","icon_filmkeren21.png");
//		
//		test.add("open", "recommend", null, null, "com.zillion.besthdmovies", "WEBMASTER_9a9f57c628fc455386f97f734fc3c060","BHM Player","icon_besthdmovies.png");
//		test.add("open", "recommend", null, null, "com.zillion.hdmoviespk", "WEBMASTER_21ce4d91a9a24fde9fb4a6e240df79da","Hd movies Pk","icon_hdmoviespk.png");
//		test.add("open", "recommend", null, null, "com.zillion.jomlayanmovie", "WEBMASTER_bd71e84ca2e64786bda284001c49fed0","jomlayanmovie","icon_jomlayanmovie.png");
//		test.add("open", "recommend", null, null, "com.zillion.nangmovie", "WEBMASTER_917237864","NangMovie","icon_nangnovie.png");
//		test.add("open", "recommend", null, null, "com.zillion.tontonmovie", "WEBMASTER_165980","Tonton Movie","icon_tonton.png");
		
		test.add("open", "recommend", "http://d3ktkctxsgwy1v.cloudfront.net/player/install/2.5.1/World4ufree_v2.5.1%28com.zillion.wordfufree%29.apk", 
				"http://www.gbox.sc/cloud/share/shareIndex.action", "com.zillion.wordfufree", "WEBMASTER_04b8236892fc4dbc9734e3071cea37f9","World4ufree","icon_hdmoviespk.png");
		test.add("open", "recommend", "http://d3ktkctxsgwy1v.cloudfront.net/player/install/2.5.1/Moviesevil_v2.5.1%28com.zillion.moviesevil%29.apk", 
				"http://www.gbox.sc/cloud/share/shareIndex.action", "com.zillion.moviesevil", "WEBMASTER_117ad81a5e524cac87fc5a52347bd6d6","Moviesevil","icon_jomlayanmovie.png");
		test.add("open", "recommend", "http://d3ktkctxsgwy1v.cloudfront.net/player/install/2.5.1/Movies5x_v2.5.1%28com.zillion.moviesfx%29.apk", 
				"http://www.gbox.sc/cloud/share/shareIndex.action", "com.zillion.moviesfx", "WEBMASTER_9f2213c809e848a697a8524e3eb7a31a","Movies5x","icon_nangnovie.png");
		test.add("open", "recommend", "http://d3ktkctxsgwy1v.cloudfront.net/player/install/2.5.1/X10_v2.5.1%28com.zillion.xten%29.apk", 
				"http://www.gbox.sc/cloud/share/shareIndex.action", "com.zillion.xten", "WEBMASTER_de6b7ef5736a41d5bcbce186d7f21c75","X10","icon_tonton.png");

		test.add("open", "recommend", null, null, "com.moviesnh", "WEBMASTER_e5fdad422d4e409188f4ab40a58704b1","movies900","icon_tonton.png");
		test.print();
	}
}
